export const getAddress=()=>{
  return new Promise(resolve,reject=>{
      wx.getLocation({
        success: function(res) {
getLocation({
  success:function(res){
    getLocation(res.latitude,res.longitude).then(res=>{
      resolve(res.data.result.formatted_address)  
    })
  }
})
        },
      })
  })
}
function getLocation(lat,lon){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: `${lat},${lon}&output=json`,
      success:function(res){
        resolve(res)
      },fail:function(err){
        reject(err)
      }
    })
  })
}